import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class TextWidget extends StatefulWidget {
  TextWidget(Key key) : super(key: key);
  @override
  State<StatefulWidget> createState() {
    return TextWidgetState();
  }
}

class TextWidgetState extends State<TextWidget> {
  var _serviceStatus = "loading...";

  @override
  Widget build(BuildContext context) {
    return  Text(
      '$_serviceStatus',
      style: TextStyle(fontSize: 22.0, color: Colors.white),
    );
  }

  void changeText(String text) {
    setState(() {
      _serviceStatus = text;
    });
  }
}